//
//  JigSawMainMovieView.h
//  JigSawKiosk
//
//  Created by Stulberg on 10-10-17.
//  Copyright 2010 FruitonLabs. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Quartz/Quartz.h>
#import <QTKit/QTKit.h>


@interface JigSawMainMovieView : NSView {
	CALayer *rootLayer ;
	QTMovieLayer *flMovieLayer ;
	QTMovie *flMovie ;
		
	NSURL *url ;
	
	NSTimer *movieCompleteTimer ;
	// delegate for the callback
	id delegate ;
}

- (id) initWithMovie:(NSRect)frame movie:(NSURL*)movieName ;
-(void) setupLayers ;

-(void) startMovieWithCallbackOnComplete:(NSURL*)movieName ;
- (void) movieCompleteTimerMethod:(NSTimer*) timer ;

- (void) movieStart ;
- (void) movieStop ;

// delagate methods
- (void)setDelegate:(id)aDelegate ;
- (void)delegatedMethod ;

@property (nonatomic, retain) CALayer *rootLayer ;
@property (nonatomic, retain) QTMovieLayer *flMovieLayer ;
@property (nonatomic, retain) QTMovie *flMovie ;
@property (nonatomic, retain) NSTimer *movieCompleteTimer ;

@end


@interface NSObject(MainMovieViewDelegateMethods)
- (void)mainMovieViewCallback:(JigSawMainMovieView *)myJigSawMainMovieView;
@end